package com.nulldev.util.uri.yt.legacy;

import com.nulldev.util.java.Variables;

public class YTIndex {

	private YTIndexTYPE type;
	private String id, data;
	private String quality, extension;
	public YTIndex(final YTIndexTYPE type, final String id, final String data) {
		this.type = type;
		this.id = id;
		this.data = data;
	}
	
	public YTIndex(final YTIndexTYPE type, final String id, final String data, final String quality) {
		this.type = type;
		this.id = id;
		this.data = data;
		this.quality = quality;
	}
	
	public YTIndexTYPE getType() {
		return this.type;
	}
	
	public String getID() {
		return this.id;
	}
	
	public String getQuality() {
		if (Variables.notNull(this.quality)) {
			return this.quality;
		}
		return "N/A";
	}
	
	public String getExtension() {
		if (this.extension == null) {
			return "N/A";
		}
		return this.extension;
	}
	
	public void setExtension(final String ext) {
		this.extension = ext;
	}
	
	public void setQuality(final String quality) {
		this.quality = quality;
	}
	
	public String getData() {
		return this.data;
	}
	
	@Override
	public String toString() {
		return "Type: " + this.type + " | IDX: " + this.idX + " | Quality: " + this.getQuality();
	}

	private String idX = "N/A";
	public void setIDX(final String idX) {
		this.idX = idX;
	}
	
	public String getIDX() {
		return this.idX;
	}
}
